package com.example.asthmate;

import util.MyAsyncHTTPRequest;
import webInterfaces.WebUserInterface;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class EnvironmentActivity extends Activity{
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);
        WebView wv = (WebView) findViewById(R.id.webView);
		wv.getSettings().setJavaScriptEnabled(true);
		wv.setWebChromeClient(new WebChromeClient());
		
		wv.getSettings().setBuiltInZoomControls(true);
		wv.requestFocusFromTouch();

		// Set the client
		wv.setWebViewClient(new WebViewClient());
		wv.loadUrl("http://192.168.0.3:8080/server_rest_asthmate/environment.jsp");
		
        wv.addJavascriptInterface(new WebUserInterface(this), "Android");
        
	}
}